package com.geek.novel.services

import com.geek.novel.common.Constant
import com.geek.novel.entity.AppVersion
import com.geek.novel.network.RslHandler
import com.geek.novel.network.RepositoryProvider
import com.geek.novel.repository.HttpRepository

/**
 * 版本相关Service
 */
class VersionService(rslHandler: RslHandler): BaseService(rslHandler) {

    private var repository: HttpRepository = RepositoryProvider.provideRepository()

    /**
     * 检查更新
     */
    fun checkUpdate() {
        //调用登录接口
        val observer = repository.checkUpdate()
        compose(observer, Constant.HTTP_KEY_APP_CHECK_UPDATE, AppVersion::class.java)
    }


}
